package com.yizhubao.app.base;

/**
 * @author PACY
 * 创建时间 19/1/23 09:45.
 * 邮箱 pengwwe457621023@qq.com
 * 类描述 请求返回基类
 */
public class BaseResultBean<T> extends BaseBean {

    /**
     * status : 1
     * msg :  SUCCESS
     * data : null
     */

    private int code;
    private String msg;
    private T data;

    public void setCode(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess() {
        return getCode()==0;
    }


    @Override
    public String toString() {
        return "BaseResultBean{" +
            "code='" + code + '\'' +
            ", msg='" + msg + '\'' +
//            ", data=" + data.toString() +
            '}';
    }
}
